home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / ev_201.zip / TDESKTOP.HPP < prev    next >
C/C++ Source or Header  |  1993-07-03  |  4KB  |  115 lines

  1. #if !defined (TDESKTOP)              // Prevents multiple declarations errors
  2. #define TDESKTOP
  3.  
  4.  
  5. /*
  6.    Module        : TDESKTOP.HPP
  7.    Version       : 2.00
  8.    Revision date : July 3rd, 1993
  9.    Author(s)     : Remy Gendron
  10.  
  11.    Description   : Member functions of {tdesktop} class.
  12. */
  13.  
  14.  
  15. // Headers ------------------------------------------------------------------
  16.  
  17. #include <conio.h>
  18. #include <stdio.h>
  19. #include "scrfcts.h"
  20. #include "tmenubar.hpp"
  21. #include "tstatusline.hpp"
  22.  
  23.  
  24. // Macros -------------------------------------------------------------------
  25.  
  26. #include "stdmacro.h"                           // Standard macro definitions
  27.  
  28.  
  29. // TypeDefs -----------------------------------------------------------------
  30.  
  31. #include "stdtype.h"                             // Standard type definitions
  32.  
  33.  
  34. // Prototypes ---------------------------------------------------------------
  35.  
  36. class tdesktop
  37. {
  38.    int              deskbackcolor ;             // Desktop's background color
  39.    int              deskforecolor ;             // Desktop's foreground color
  40.    char             desktexture ;             // ASCII code to create desktop
  41.    char        huge *desktitle ;                           // Desktop's title
  42.    int              desktitlebackcolor ;          // Title's background color
  43.    int              desktitleforecolor ;          // Title's foreground color
  44.    int              desktextmode ;        // Text mode to use to open desktop
  45.    bool             deskbbg ;     // If TRUE, bright background colors enable
  46.    text_info        desklastti ;      // To save previous screen's attributes
  47.    cur_info         desklastci ;      // To save previous cursor's attributes
  48.    char        huge *desksavedscr ;               // To save screen's content
  49.    int              deskstatus ;                         // 0:closed 1:opened
  50.  
  51.    int              deskscreenheight ;             // Current screen's height
  52.    int              deskscreenwidth ;               // Current screen's width
  53.  
  54.  
  55. public:
  56.  
  57. far tdesktop () ;                                              // Constructor
  58.  
  59. far ~tdesktop () ;                                              // Destructor
  60.  
  61. void far tdesktop::getsize                          // Returns desktop's size
  62. (
  63.    int huge *height,                           // Ptrs to ints to return size
  64.    int huge *width
  65. ) ;
  66.  
  67. void far tdesktop::settextmode                               // Sets textmode
  68. (
  69.    int  mode=C80,                                     // Textmode code number
  70.    bool brightbackground=FALSE   // If true, bright background colors enabled
  71. ) ;
  72.  
  73. void far tdesktop::setdeskcolors                     // Sets desktop's colors
  74. (
  75.    int back=LIGHTGRAY,                          // Desktop's background color
  76.    int fore=BLUE,                               // Desktop's foreground color
  77.    int clockback=RED,                                          // Clock color
  78.    int clockfore=WHITE
  79. ) ;
  80.  
  81. void far tdesktop::settexture                        // Set's desktop texture
  82. (
  83.    char asciicode='░'            // ASCII code of character to use as texture
  84. ) ;
  85.  
  86. void far tdesktop::settitle                           // Sets desktop's title
  87. (
  88.    char huge *text=NULL,                                   // Desktop's title
  89.    int  back=EV_DEF,                              // Title's background color
  90.    int  fore=EV_DEF                               // Title's foreground color
  91. ) ;
  92.  
  93. void far tdesktop::open () ;                                 // Opens desktop
  94.  
  95. void far tdesktop::close () ;                  // Restores pre-desktop screen
  96.  
  97. void far tdesktop::refresh () ;    // Redraws desktop, statusline and menubar
  98.  
  99.  
  100. private:
  101.  
  102. void far tdesktop::display () ;    // Draws the desktop from current settings
  103.  
  104.  
  105. } ;
  106.  
  107. // --------------------------------------------------------------------------
  108.  
  109. extern tdesktop desktop ;           // Reference to the desktop global object
  110.  
  111.  
  112. // End Header File ----------------------------------------------------------
  113.  
  114. #endif
  115.